#define DEBUG
#include <cstdio>
#include <cassert>
#define MAXN 100000
#define MAXK 100000
#define MAXQ 100000

using namespace std;

void add(int *a, int l, int r, int v, int n, int k) {
  if (l>r) {
    add(a, l, k, v, n, k);
    add(a, 1, r, v, n, k);
  } else {
    a[l] = ((a[l]+v)%(n/k)+n/k)%(n/k);
    a[r+1] = ((a[r+1]-v)%(n/k)+n/k)%(n/k);
  }
}

int main() {
#ifdef DEBUG
  freopen("3162.in", "r", stdin);
  freopen("3162.out", "w", stdout);
#endif

  static int com[MAXQ+1][2], z[MAXN+1], rotate[MAXK+2];
  int n, k, q;
  scanf("%d %d %d", &n, &k, &q);
  for (int i=1; i<=q; i++) {
    scanf("%d %d", com[i], com[i]+1);
    if (com[i][0]==1) {
      com[i][1] = (com[i][1]%k+k)%k;
    } else {
      com[i][1] = (com[i][1]%n+n)%n;
    }
  }
  for (int i=1; i<=n; i++) {
    scanf("%d", z+i);
  }

  for (int i=1; i<=q; i++) {
    if (com[i][0]==2) {
      int h=rotate[0]+1, t=(rotate[0]+k-com[i][1]%k-1)%k+1;
      add(rotate, h, t, -com[i][1]/k, n, k);
      if (com[i][1]%k) {
	h=t%k+1, t=(rotate[0]+k-1)%k+1;
	add(rotate, h, t, -com[i][1]/k-1, n, k);
      }
    }
    rotate[0] = ((rotate[0]-com[i][1])%k+k)%k;
  }

  for (int i=2; i<=k+1; i++) {
    rotate[i] = (rotate[i]+rotate[i-1])%(n/k);
  }

  static int temp[MAXN+1];
  for (int i=1; i<=n/k; i++) {
    for (int j=1; j<=k; j++) {
      int x=(j+rotate[0]-1)%k+1, y=(i+rotate[x]-1)%(n/k)+1;
      temp[(y-1)*k+x]=(i-1)*k+j;
    }
  }
  for (int i=1; i<=n; i++) {
    printf("%d ", z[temp[i]]);
  }

  fcloseall();
  return 0;
}
